#ifndef COMMUNITYPOST_H
#define COMMUNITYPOST_H

#include <QString>
#include <QJsonObject>


namespace WordMemory
{
    struct CommunityPost
    {
        int id = 0;
        int userId = 0;
        QString title;
        QString content;
        QString authorUsername;
        QString createdAt;
        int likesCount = 0;
        int sharesCount = 0;
        bool isLikedByCurrentUser = false;

        static CommunityPost fromJson(const QJsonObject &json);
        QJsonObject toJson() const;

    };
}

#endif // COMMUNITYPOST_H
